package com.yuntai.pms.model.enums;

import java.util.LinkedHashMap;
import java.util.Map;

public enum YesOrNoState {

    YES(0, "是"),
    NO(1, "否");

    private int code;
    private String name;
    private final  static Map<Integer,String> yesNoMap = new LinkedHashMap<Integer,String>();

    public static Map<Integer, String> getYesNoMap() {
        return yesNoMap;
    }

    static   {
        yesNoMap.put(YesOrNoState.YES.getCode(), YesOrNoState.YES.getName());
        yesNoMap.put(YesOrNoState.NO.getCode(), YesOrNoState.NO.getName());
    }
    private YesOrNoState(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
